<%-- 
    Document   : index
    Created on : 10-dic-2010, 0.16.10
    Author     : v
--%>
<%@page import="javax.naming.InitialContext"%>
<%@page import="calc.NewSessionBeanRemote"%>
<%!
    private static NewSessionBeanRemote remote;
    public void jspInit() {
       
    }

    public void jspDestroy() {
        remote = null;
    }
%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
   <body bgcolor="white">
        <h1>Sum</h1>
        <hr>
        <p>Enter an amount to convert:</p>
        <form method="get">
            <input type="text" name="a" size="25">
            <input type="text" name="b" size="25">
            <br>
            <p>
            <input type="submit" value="Submit">
            <input type="reset" value="Reset">
        </form>

        <%
            String a = request.getParameter("a");
            String b = request.getParameter("b");
            Integer sum = null;
            if (a != null && b!= null)
                sum = Integer.parseInt(a) + Integer.parseInt(b);
        %>
        <p>
        Somma = <%= sum %>
        <p>
        
    </body>
</html>
